package com.fsoft.tinhcd.dao;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;

import com.fsoft.tinhcd.entity.Region;
import com.fsoft.tinhcd.util.HibernateUtil;

public class RegionDao {
	Session session;

	@SuppressWarnings("unchecked")
	public List<Region> getListRegion() {
		session = HibernateUtil.getSessionFactory().openSession();
		List<Region> list = new ArrayList<Region>();
		Query query = session.createQuery("from Region");
		list = (List<Region>) query.list();
		return list;
	}
}
